package com.jiwei.community.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jiwei.community.entity.Community;
import com.jiwei.community.vo.ResponseResult;

import java.util.List;


/**
 * (Community)表服务接口
 *
 * @author jiwei
 * @since 2024-03-20 10:57:27
 */
public interface CommunityService extends IService<Community> {

    ResponseResult getCommunityList(Integer pageNum, Integer pageSize,Long categoryId);

    ResponseResult isJoined(Long userId,Long communityId);

    ResponseResult join(Long userId,Long communityId);

    ResponseResult getCommunityById(Long communityId);

    ResponseResult cancelJoin(Long userId, Long communityId);
    void updatePostNum(Long communityId,Long increase);
    void saveCacheJoinNum();
    void saveCachePostNum();


    ResponseResult isSigned(Long userId, Long communityId);

    ResponseResult signIn(Long userId, Long communityId);

    ResponseResult getJoinedCommunity(Long userId);
}

